#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time    : 2023/11/9 10:38
# @Author  : 作者名:张铁君
# @Site    : 
# @File    : common_utils.py
# @Project : h5_auto_test
# @Software: PyCharm
import datetime
import os


# 获取当前时间
def get_now_time():
    return datetime.datetime.now()


# 获取当前时间字符串格式
def get_now_date_time_str():
    return datetime.datetime.now().strftime("%Y%m%d%H%M%S")


# 文件目录拼接
def sep(path, add_sep_before=False, add_sep_after=False):
    all_path = os.sep.join(path)
    if add_sep_before:
        all_path = os.sep + all_path
    if add_sep_after:
        all_path = all_path + os.sep
    return all_path
